package com.youmu.sichuansfc.domain;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "youmu_fund_user_login_history", schema = "youmu", catalog = "")
public class YoumuFundUserLoginHistory {
    private Long id;
    private Date addTime;
    private Date loginTime;
    private String loginIp;
    private Long fundUserId;
    private Boolean isDelete;

    public void setId(long id) {
        this.id = id;
    }

    public void setFundUserId(long fundUserId) {
        this.fundUserId = fundUserId;
    }

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "add_time")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "login_ip")
    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    @Basic
    @Column(name = "fund_user_id")
    public Long getFundUserId() {
        return fundUserId;
    }

    public void setFundUserId(Long fundUserId) {
        this.fundUserId = fundUserId;
    }



    @Basic
    @Column(name = "is_delete")
    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YoumuFundUserLoginHistory that = (YoumuFundUserLoginHistory) o;
        return id == that.id &&
                fundUserId == that.fundUserId &&
                isDelete == that.isDelete &&
                Objects.equals(addTime, that.addTime) &&
                Objects.equals(loginTime, that.loginTime) &&
                Objects.equals(loginIp, that.loginIp);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, addTime, loginTime, loginIp, fundUserId, isDelete);
    }


    @Basic
    @Column(name = "login_time")
    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }
}
